﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DTD.Land.Utilities
{
    /// <summary>
    /// Lớp commons : dùng để chứa các hàm dùng chung
    /// </summary>
    public class Commons
    {
        public static string GetAddress(string provinceName, string districtName, string wardName, string address)
        {
            if (!string.IsNullOrWhiteSpace(wardName))
            {
                address += (string.IsNullOrWhiteSpace(address) ? string.Empty : ", ") + wardName;
            }

            if (!string.IsNullOrWhiteSpace(districtName))
            {
                address += (string.IsNullOrWhiteSpace(address) ? string.Empty : ", ") + districtName;
            }

            if (!string.IsNullOrWhiteSpace(provinceName))
            {
                address += (string.IsNullOrWhiteSpace(address) ? string.Empty : ", ") + provinceName;
            }

            return address;
        }

        public static bool IsRelease
        {
            get
            {
              #if(IsRelease)
                    return true;
              #else
                return false;
              #endif
            }
        }

    }
}
